React 16 Essentials - Second Edition by Adam Boduch & Artemij Fedosejev

React 16 Essentials - Second Edition by Adam Boduch & Artemij Fedosejev

Author:Adam Boduch & Artemij Fedosejev [Adam Boduch]
Language: eng
Format: epub
Tags: Design, Web Development
Publisher: Packt Publishing
Published: 2017-11-29T22:00:00+00:00


properties: This is the component properties object

propertyName: This is the name of the property that we're validating

componentName: This is the name of the component

We first check whether our Tweet component received the tweet property:

const tweet = properties[propertyName]; if (!tweet) { return new Error('Tweet must be set.'); }

Then, we assume that the tweet property is an object, and check whether that object has no media property:

if (!tweet.media) { return new Error('Tweet must have an image.'); }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.